package com.wcs.exam.controller.callback;

import com.wcs.exam.controller.callback.biz.CallbackOrderInfoBiz;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Callback-订单信息表
 *
 * @author wcs
 * @since 2024-07-06
 */
@Tag(name = "Callback-订单信息表")
@RestController
@RequiredArgsConstructor
@RequestMapping("/v1/callback/order/info")
public class CallbackOrderInfoController {

    @NotNull
    private final CallbackOrderInfoBiz biz;

    @Operation(summary = "订单信息-交易通知")
    @RequestMapping(value = "/pay/notify/{payChannelCode}")
    public String payNotify(HttpServletRequest request, @PathVariable String payChannelCode) {
        return biz.payNotify(request, payChannelCode);
    }
}
